package cn.iocoder.yudao.module.shop.controller.admin.accountrecord.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 收支记录 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class ShopAccountRecordBaseVO {

    @Schema(description = "标题", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "标题不能为空")
    private String title;

    @Schema(description = "金额", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "金额不能为空")
    private Integer num;

    @Schema(description = "支付时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime payTime;

    @Schema(description = "经办人", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "经办人不能为空")
    private String operator;

    @Schema(description = "凭证", requiredMode = Schema.RequiredMode.REQUIRED)
    private String picUrl;

    @Schema(description = "类型： 0支出 1 收入", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
    @NotNull(message = "类型： 0支出 1 收入不能为空")
    private Integer type;

    @Schema(description = "是否固定收入", requiredMode = Schema.RequiredMode.REQUIRED, example = "false")
    @NotNull(message = "是否固定收入不能为空")
    private Boolean isFixed;

    @Schema(description = "固定收入类型 0： 日 1： 月 2：年", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private Integer fixedType;

    @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private String comment;

}
